package com.boot.mgt.dao.mysql

import com.boot.mgt.model.TaAccidentReport
import com.boot.mgt.model.vo.OrmResult
import com.boot.mgt.model.vo.TaAccidentReportVo
import org.apache.ibatis.annotations.Param
import org.springframework.stereotype.Repository
import tk.mybatis.mapper.common.Mapper

@Repository
interface TaAccidentReportMapper : Mapper<TaAccidentReport> {

    fun policeList(map: Map<String, Any>?): List<TaAccidentReportVo>

    fun officerList(map: MutableMap<String, Any>): List<TaAccidentReportVo>

    fun captainList(map: MutableMap<String, Any>): List<TaAccidentReport>

    fun selectVoById(@Param("id") id: Int, @Param("isMax") isMax: Int): TaAccidentReportVo

    fun selectAccidentCount(@Param("begin") begin: String, @Param("end") end: String): Int

    fun selectNoticeCount(@Param("begin") begin: String, @Param("end") end: String): Int

    fun selectPlatoonCount(@Param("begin") begin: String, @Param("end") end: String): List<OrmResult>

    fun selectReceiveCount(@Param("begin") begin: String, @Param("end") end: String): List<OrmResult>

    fun selectAcceptCount(@Param("begin") begin: String, @Param("end") end: String): List<OrmResult>

    fun selectCorrelation(map: MutableMap<String, Any>): List<TaAccidentReport>

    /**
     * 接警中数据列表
     */
    fun searchCasesAcceptedActioningList(): List<Any?>?

    /**
     * 勘察中数据列表
     */
    fun searchCasesSurveyingList(): List<Any?>?

    /**
     * 事故分布数据列表
     */
    fun searchTrafficDistributionList(map: Map<String, Any>?): List<Any?>?
    /**
     * 查询已绑定的事故编号
     */
   fun getAllList():List<TaAccidentReport>
}